package com.tk.ehr.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tk.ehr.mapper.EmployeeMapper;
import com.tk.ehr.model.entity.Employee;
import com.tk.ehr.service.EmployeeService;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class EmployeeServiceImpl implements EmployeeService {

  @Resource
  private EmployeeMapper employeeMapper;

  @Override
  public PageInfo<Employee> page(Integer pageNum, Integer pageSize) {
    PageHelper.startPage(pageNum, pageSize);
    return PageInfo.of(employeeMapper.list());
  }
}
